package cn.com.nes.common.packet;


import cn.com.nes.common.generator.SequenceNumberGenerator;

import java.util.HashMap;
import java.util.Map;

public class CommandRequest extends AbstractPacket {

    private String command;
    private Map<String, Object> parameters = new HashMap<>();

    @Override
    public PacketType getType() {
        return PacketType.REQUEST;
    }

    public CommandRequest(Long sequenceNumber) {
        super(sequenceNumber);
    }

    public CommandRequest(SequenceNumberGenerator generator) {
        super(generator);
    }

    public CommandRequest() {
        super();
    }

    public String getCommand() {
        return command;
    }

    public CommandRequest setCommand(String command) {
        this.command = command;
        return this;
    }

    public Map<String, Object> getParameters() {
        return parameters;
    }

    public CommandRequest setParameters(Map<String, Object> parameters) {
        this.parameters = parameters;
        return this;
    }
}
